<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Pronetos | <%= @page_title or "Professor's Network" %></title>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Language" content="en-us" />
  <meta http-equiv="imagetoolbar" content="false" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="ROBOTS" content="ALL" />

  <%= stylesheet_link_tag 'blueprint/screen', :media => 'screen, projection' %>
  <%= stylesheet_link_tag 'blueprint/print', :media => 'print', :plugin => 'sourdough' %>
  <%= stylesheet_link_tag 'theme', :media => 'screen, projection' %>
  <%= stylesheet_link_tag 'content', :media => 'screen, projection' %>
  <%= javascript_include_tag 'jquery', :plugin => 'sourdough' %>
  <%= javascript_include_tag 'application' %>
</head>

<body class="<%= @controller.controller_name %>">

  <div class="container header">
    <div id="user_tools" class="column span-24 last">
      <%= render :partial => 'layouts/search' %>
      <p id="status">
        <% if logged_in? %>
          Signed in as <%= current_user.name %>
            <% restrict_to "admin" do %>
              <%= link_to "Site Administration", admin_path %>
            <% end %>
            <em>|</em>
            <%= link_to 'Sign out', logout_url %>
        <% else %>
          Join <%= User.count_not_banned %> scholars like yourself!
          <%= link_to 'Sign up', signup_url %>
          or
          <%= link_to 'Login', login_url %>
        <% end %>
      </p>
    </div>

  <% if @controller.controller_name == 'home' %>
    <div id="header" class="column prepend-1 span-6">
  <% else %>
    <div id="header" class="column prepend-1 span-9">
  <% end %>
      <h1><%= link_to 'Pronetos', home_path %></h1>
      <% if @controller.controller_name == 'home' %>
        <h2><%= link_to 'Professor\'s Network', home_path %></h2>
      <% end %>
    </div>

  <% if @controller.controller_name == 'home' %>
    <div id="navigation" class="column span-16 append-1 last">
  <% else %>
    <div id="navigation" class="column span-13 append-1 last">
  <% end %>
      <ul class="navigation">
        <% if logged_in? %>
          <li><%= link_to_with_span('Your Home', home_profile_url(current_user), :id => 'user_home') %></li>
        <% end %>
        <li><%= link_to_with_span('Members', profiles_path, :id => 'members') %></li>
        <li><%= link_to_with_span('Disciplines', disciplines_path, :id => 'disciplines') %></li>
        <li><%= link_to_with_span('Articles', articles_list_path, :id => 'articles') %></li>
      </ul>
      <% if @controller.controller_name == 'home' %>
        <p id="blurb"><em>Pronetos</em> is a home to <%= link_to('communities', disciplines_path) %> and <%= link_to('scholars', profiles_path) %> of every academic discipline: a global think-tank of the leaders in your field.</p>
      <% end %>
    </div>
  </div>

  <% if flash[:error] or flash[:notice] %>
  <div id="flash" class="container">
    <div class="column prepend-6 span-17 append-1 last">
    <% if flash[:error] %>
      <div class="flash error">
        <h6>Error</h6>
        <p><%= h(flash[:error]) %></p>
      </div>
    <% end %>
    <% if flash[:notice] %>
      <div class="flash notice">
        <h6>Notice</h6>
        <p><%= h(flash[:notice]) %></p>
      </div>
    <% end %>
    </div>
  </div>
  <% end %>

  <div class="container" id="content">
    <%= yield %>
  </div>
  <%= render :partial => 'layouts/footer_ad' %>

  <div id="footer" class="container">
    <div class="column span-24 last">
      <%= render :partial => 'layouts/license' %>
      <p class="navigation">
        <%= link_to 'Terms of Use', terms_path %> |
        <%= link_to 'Blog', 'http://blog.pronetos.com' %> |
        <%= link_to 'About', 'http://blog.pronetos.com?page_id=2' %> |
        <%= link_to 'Help', 'http://blog.pronetos.com/?page_id=18' %>
      </p>
    </div>
  </div>

  <%= render :partial => 'layouts/analytics' %>
</body>

</html>
